<template>
  <div class="page-miH page-bgBack">
    <PageHeader @back="goBack">确认报送员工信息</PageHeader>
    <div class="tabbox">
      <div class="setting-stepbox">
        <a-steps :current="current">
          <!-- @change="stepsChange" -->
          <a-step title="确认信息" />
          <a-step title="填写密码信息" />
          <a-step title="查看结果" />
        </a-steps>
      </div>
    </div>
    <information v-if="current == 0" @upData="upData" />
    <password v-if="current == 1" @upData="upData" @upDatadata="upDatadata" />
    <results :dataShow="dataShow" v-if="current == 2" />
  </div>
</template>
<script>
import information from "./information";
import password from "./password";
import results from "./results";
export default {
  components: {
    information,
    password,
    results
  },
  data() {
    return {
      dataShow: null,
      current: 0
    };
  },
  methods: {
    goBack() {
      this.$confirm({
        title: "员工信息尚未上报，是否确认离开？",
        okText: "确定",
        cancelText: "取消",
        onOk: () => {
          this.$router.go(-1);
        }
      });
    },
    upData(e) {
      this.current = e;
    },
    upDatadata(e) {
      this.dataShow = e.data;
    },
    stepsChange(e) {
      this.current = e;
    }
  },
  destroyed() {
    sessionStorage.setItem("taxCalculate/authorityId", "");
    sessionStorage.setItem("taxCalculate/reportIdArr", "");
  }
};
</script>
<style lang="scss" scoped>
.setHead {
  // position: sticky;
  // top: 0;
  background: #fff;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 24px;
  z-index: 99;
  div {
    font-size: 16px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.85);
  }
}
.tabbox {
  padding: 24px;
  background: #fff;
  .setting-stepbox {
    // overflow: auto;
    .ant-steps {
      height: 122px;
      display: flex;
      align-items: center;
      background: #fff;
      box-shadow: 0px 4px 12px 0px rgba(106, 102, 246, 0.1) !important;
      border-radius: 4px;
      padding: 0 186px;
    }
  }
}
</style>
